package tour;

import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.CharStreams;
import org.antlr.v4.runtime.CommonTokenStream;

import java.io.IOException;

public class Col {
    public static void main(String[] args) throws IOException {
        CharStream input = CharStreams.fromStream(System.in);
        RowsLexer lexer = new RowsLexer(input);
        CommonTokenStream tokenStream = new CommonTokenStream(lexer);
        int col = 1;
        if (args.length > 0) {
            col = Integer.parseInt(args[0]);
        }
        // pass column number
        RowsParser parser = new RowsParser(tokenStream, col);
        // need not build a tree
        parser.setBuildParseTree(false);
        // start parsing
        parser.file();
    }

}
